import 'package:flutter/material.dart';
import 'package:hi_flutter/data/data.dart';

class AppPage extends StatelessWidget {

  const AppPage({Key? key, this.body, this.actions, this.floatingActionButton}) : super(key: key);

  final Widget? body;
  final List<Widget>? actions;
  final Widget? floatingActionButton;

  @override
  Widget build(BuildContext context) {
    AppData appData = ModalRoute.of(context)?.settings.arguments as AppData;
    return Scaffold(
      appBar: AppBar(
          title: Text(appData.title),
        actions: actions,
      ),
      body: body,
      floatingActionButton: floatingActionButton,
    );
  }
}
